<HTML><HEAD><TITLE>new_domain_var(-Var)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>new_domain_var(-Var)</H1>
A user hook predicate which is called whenever a variable obtains a default
domain from the solver.


<DL>
<DT><EM>-Var</EM></DT>
<DD>A variable.
</DD>
</DL>
<H2>Description</H2>
   This predicate is a simple hook to notify about free variables being
   converted into domain variables.  Whenever the finite domain solver
   assigns a free variable a domain, it invokes this predicate in the
   module fd_domain with the variable as argument.  To use the mechanism,
   it is necessary to recompile this predicate in the module fd_domain.

<P>

<H3>Fail Conditions</H3>
   None.


<H3>Resatisfiable</H3>
   No.
<H2>Examples</H2>
<PRE>
   [eclipse 22]: compile(user, fd_domain).
   new_domain_var(X) :- printf("new domain variable created: %mw%n", [X]).
   user       compiled traceable 88 bytes in 0.00 seconds
   yes.
   [eclipse 23]: X+Y #&gt; T.
   new domain variable created: X[-10000000..10000000]
   new domain variable created: Y[-10000000..10000000]
   new domain variable created: T[-10000000..10000000]



</PRE>
<H2>See Also</H2>
<A HREF="../../lib/fd/NN-2.html">:: / 2</A>, <A HREF="../../lib/fd/HNN-2.html">#:: / 2</A>, <A HREF="../../lib/fd/default_domain-1.html">default_domain / 1</A>
</BODY></HTML>
